12 lines
306 B
Python
12 lines
306 B
Python
|
from git import Repo
|
||
|
from django_cron import CronJobBase, Schedule
|
||
|
from django.conf import settings
|
||
|
|
||
|
class FetchRemoteCron(CronJobBase):
|
||
|
schedule = Schedule(run_every_mins=5)
|
||
|
code = "manager.fetchremotecron"
|
||
|
|
||
|
def do(self):
|
||
|
repo = Repo(settings.BASE_DIR)
|
||
|
repo.remotes[0].fetch()
|