kaspar030 / dwq

Disque Work Queue
GNU General Public License v3.0
0 stars 2 forks source link

[FEATURE REQUEST] don't require git cache #2

Open MrKevinWeiss opened 3 years ago

MrKevinWeiss commented 3 years ago

I think it would be better to use git cache optionally:

    def checkout(s, repo, commit, **kwargs):
        target_path = s.path(GitJobDir.dirkey(repo, commit, **kwargs))
        subprocess.check_output(
            ["git", "cache", "clone", repo, commit, target_path],
            stderr=subprocess.STDOUT,
        )

This would allow a bit more simplified works to run and not require the custom git-cache functionality.

kaspar030 commented 3 years ago

good point. maybe abstract out the whole git stuff to something like "prepare_commands: [...] that get only called once per workdir. It would be nice to be able to call "hostname" or "df" without having to supply any repository information.

kaspar030 commented 3 years ago

I was planning on implementing that once disque is properly integrated in redis, as then, there'd be place for a persistent storage.

MrKevinWeiss commented 3 years ago

It would also be nice to allow for not just the commit has but a PR number as an arg...