Skip to content

Commit

Permalink
Merge pull request #64 from European-XFEL/slurm-match
Browse files Browse the repository at this point in the history
Make slurm jobs respect --match
  • Loading branch information
JamesWrigley authored Jul 12, 2023
2 parents c624669 + abf6e13 commit 57c5c9e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion damnit/backend/extract_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ def extract_and_ingest(self, proposal, run, cluster=False,

python_cmd = [sys.executable, '-m', 'damnit.backend.extract_data',
'--cluster-job', str(proposal), str(run), run_data.value]
for m in match:
python_cmd.extend(["--match", m])

res = subprocess.run([
'sbatch', '--parsable',
*self.slurm_options(),
Expand All @@ -222,9 +225,11 @@ def extract_and_ingest(self, proposal, run, cluster=False,
ap.add_argument('run', type=int)
ap.add_argument('run_data', choices=('raw', 'proc', 'all'))
ap.add_argument('--cluster-job', action="store_true")
ap.add_argument('--match', action="append", default=[])
args = ap.parse_args()
logging.basicConfig(level=logging.INFO)

Extractor().extract_and_ingest(args.proposal, args.run,
cluster=args.cluster_job,
run_data=RunData(args.run_data))
run_data=RunData(args.run_data),
match=args.match)

0 comments on commit 57c5c9e

Please sign in to comment.