예제 #1
0
        public void CompleteJob(UserJobAction uja)
        {
            //test here if userId is logged in or return
            _db.CompleteJob(uja.JobId, uja.UserId);

            Clients.All.SendAsync("JobCompleted", uja.JobId);
        }
예제 #2
0
        public void TakeJob(UserJobAction uja)
        {
            Job job = _db.AssignJob(uja.JobId, uja.UserId);

            Clients.Others.SendAsync("JobTaken", job).Wait();

            Clients.Caller.SendAsync("MyJob", job);
        }