Exemplo n.º 1
0
def pull_and_notify_user(path):
    print "processing:", path
    p = GitSynchronizer(path, NotificationServiceClient().notify)
    try:
        p.pull_all_branches()
        print "pull and push done"
    except:
        traceback.print_exc()
        print "Pull error for: %s" % path
Exemplo n.º 2
0
 def msg_loop(self):
     for repo in enum_git_repo():
         if os.path.exists(repo.full_path):
             p = GitSynchronizer(repo.full_path, NotificationServiceClient().notify)
             success = False
             try:
                 p.pull_all_branches()
                 print "pull and push done", p.sync_msg
                 success = True
             except:
                 traceback.print_exc()
                 print "Pull error for: %s" % repo.full_path
             repo.last_checked = timezone.now()
             repo.is_last_pull_success = success
             repo.save()