<commit_before>from celery import task

from elasticgit import EG

from unicoremc.states import ProjectWorkflow


@task(serializer='json')
def start_new_project(project_id, access_token):
    from unicoremc.models import Project

    project = Project.objects.get(pk=project_id)
    workflow = ProjectWorkflow(instance=project)
    workflow.run_all(access_token=access_token)


@task(serializer='json')
def push_to_git(repo_path):
    workspace = EG.workspace(repo_path)
    if workspace.repo.remotes:
        repo = workspace.repo
        remote = repo.remote()
        remote.fetch()
        remote_master = remote.refs.master
        remote.push(remote_master.remote_head)<commit_msg>add more debug to push to git<commit_after>from celery import task

from elasticgit import EG

from unicoremc.states import ProjectWorkflow


@task(serializer='json')
def start_new_project(project_id, access_token):
    from unicoremc.models import Project

    project = Project.objects.get(pk=project_id)
    workflow = ProjectWorkflow(instance=project)
    workflow.run_all(access_token=access_token)


@task(serializer='json')
def push_to_git(repo_path):
    workspace = EG.workspace(repo_path)
    if workspace.repo.remotes:
        print 'pushing to git started'
        repo = workspace.repo
        remote = repo.remote()
        remote.fetch()
        remote_master = remote.refs.master
        remote.push(remote_master.remote_head)
        print 'pushing to git finished'
{'fraction_non_alphanumeric': 0.08577263444520082, 'fraction_numerical': 0.0, 'mean_word_length': 3.983050847457627, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3993385', 'n_tokens_mistral': 455, 'n_tokens_neox': 439, 'n_words': 95}