"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scheduler/queue/scheduler_non_oss.go" between
drone-2.18.0.tar.gz and drone-2.19.0.tar.gz

About: Drone is a Continuous Delivery system built on (docker) container technology.

scheduler_non_oss.go  (drone-2.18.0):scheduler_non_oss.go  (drone-2.19.0)
skipping to change at line 15 skipping to change at line 15
// You may obtain a copy of the License at // You may obtain a copy of the License at
// //
// http://www.apache.org/licenses/LICENSE-2.0 // http://www.apache.org/licenses/LICENSE-2.0
// //
// Unless required by applicable law or agreed to in writing, software // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, // distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//go:build !oss
// +build !oss // +build !oss
package queue package queue
import ( import (
"context"
"time" "time"
"github.com/drone/drone/core" "github.com/drone/drone/core"
"github.com/drone/drone/service/redisdb" "github.com/drone/drone/service/redisdb"
) )
// New creates a new scheduler. // New creates a new scheduler.
func New(store core.StageStore, r redisdb.RedisDB) core.Scheduler { func New(store core.StageStore, r redisdb.RedisDB) core.Scheduler {
if r == nil { if r == nil {
return scheduler{ return scheduler{
queue: newQueue(store), queue: newQueue(context.Background(), store),
canceller: newCanceller(), canceller: newCanceller(),
} }
} }
sched := schedulerRedis{ sched := schedulerRedis{
queue: newQueue(store), queue: newQueue(context.Background(), store),
cancellerRedis: newCancellerRedis(r), cancellerRedis: newCancellerRedis(r),
} }
const globalMutexExpiryTime = 10 * time.Second const globalMutexExpiryTime = 10 * time.Second
sched.globMx = r.NewMutex("drone-scheduler-mx", globalMutexExpiryTime) sched.globMx = r.NewMutex("drone-scheduler-mx", globalMutexExpiryTime)
return sched return sched
} }
 End of changes. 4 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)