Skip to content

Commit 03485e2

Browse files
typo [ci skip]
1 parent 6292b80 commit 03485e2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future.batchtools
2-
Version: 0.20.0-9006
2+
Version: 0.20.0-9007
33
Depends:
44
R (>= 3.2.0),
55
parallelly,

R/batchtools_slurm.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ patchClusterFunctionsSlurm2 <- function(cf) {
214214
nodename <- env[["nodename"]]
215215
org_listJobsQueued <- env[["listJobsQueued"]]
216216

217-
isJobQueued <- function(reg, batch_id, since = NULL) {
217+
## Allow for a 15-minute offset in time between host and Slurm's sacct server
218+
isJobQueued <- function(reg, batch_id, since = NULL, offset = 15*60) {
218219
stopifnot(length(batch_id) == 1L, !is.na(batch_id), nzchar(batch_id))
219220
stopifnot(is.null(since) || inherits(since, "POSIXct"))
220221

221-
## FIXME: Add also --starttime=<start time>, because 'sacct' only returns jobs ran today
222-
args <- c("--user=$USER", "--noheader", "--parsable2", "--allocations", "--format=State", sprintf("--jobs=%s", batch_id), sprintf("--start-time=%s", format(since - 15*60, format = "%FT%T"))) ## Allow for 15-min time offsets
222+
args <- c("--user=$USER", "--noheader", "--parsable2", "--allocations", "--format=State", sprintf("--jobs=%s", batch_id), sprintf("--starttime=%s", format(since - offset, format = "%FT%T")))
223223
clusters <- getClusters(reg)
224224
if (length(clusters) > 0) {
225225
args <- c(args, sprintf("--clusters=%s", clusters))

0 commit comments

Comments
 (0)