Merge lp:~brianaker/gearmand/laptop-patches into lp:gearmand

Proposed by Brian Aker on 2013-06-15
Status: Merged
Merged at revision: 789
Proposed branch: lp:~brianaker/gearmand/laptop-patches
Merge into: lp:gearmand
Diff against target: 101 lines (+25/-4)
6 files modified
libgearman-server/plugins/queue/redis/queue.cc (+2/-2)
libgearman-server/server.cc (+18/-0)
libgearman/actions.cc (+1/-1)
libgearman/run.cc (+1/-0)
tests/libgearman-1.0/task.cc (+2/-1)
tests/libgearman-1.0/worker_test.cc (+1/-0)
To merge this branch: bzr merge lp:~brianaker/gearmand/laptop-patches
Reviewer Review Type Date Requested Status
Tangent Trunk 2013-06-15 Pending
Review via email: mp+169666@code.launchpad.net
To post a comment you must log in.
779. By Tangent.Org Continuous Integration on 2013-06-21

Merge lp:~brianaker/gearmand/update-bootstrap-june Build: jenkins-Gearmand-653

780. By Tangent.Org Continuous Integration on 2013-06-21

Merge lp:~brianaker/gearmand/update-bootstrap-june Build: jenkins-Gearmand-655

781. By Tangent.Org Continuous Integration on 2013-06-21

Merge lp:~brianaker/gearmand/update-bootstrap-june Build: jenkins-Gearmand-656

782. By Tangent.Org Continuous Integration on 2013-06-21

Merge lp:~brianaker/gearmand/m4-updates-june Build: jenkins-Gearmand-657

783. By Tangent.Org Continuous Integration on 2013-06-21

Merge lp:~brianaker/gearmand/fix_segfault Build: jenkins-Gearmand-658

784. By Brian Aker on 2013-06-21

Update...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libgearman-server/plugins/queue/redis/queue.cc'
2--- libgearman-server/plugins/queue/redis/queue.cc 2013-06-11 18:52:42 +0000
3+++ libgearman-server/plugins/queue/redis/queue.cc 2013-06-21 19:13:29 +0000
4@@ -100,7 +100,7 @@
5
6 Hiredis::Hiredis() :
7 Queue("redis"),
8- server("127.0.0.1"),
9+ server("localhost"),
10 service("6379"),
11 _redis(NULL)
12 {
13@@ -116,7 +116,7 @@
14 gearmand_error_t Hiredis::initialize()
15 {
16 int service_port= atoi(service.c_str());
17- if ((_redis= redisConnect("127.0.0.1", service_port)) == NULL)
18+ if ((_redis= redisConnect(server.c_str(), service_port)) == NULL)
19 {
20 return gearmand_gerror("Could not connect to redis server", GEARMAND_QUEUE_ERROR);
21 }
22
23=== modified file 'libgearman-server/server.cc'
24--- libgearman-server/server.cc 2013-06-15 08:40:14 +0000
25+++ libgearman-server/server.cc 2013-06-21 19:13:29 +0000
26@@ -827,6 +827,24 @@
27 {
28 return gearmand_gerror("_server_queue_work_data", ret);
29 }
30+
31+ /* Remove from persistent queue if one exists. */
32+ if (server_job->job_queued)
33+ {
34+ ret= gearman_queue_done(Server,
35+ server_job->unique,
36+ server_job->unique_length,
37+ server_job->function->function_name,
38+ server_job->function->function_name_size);
39+ if (gearmand_failed(ret))
40+ {
41+ gearmand_gerror("Remove from persistent queue", ret);
42+ return ret;
43+ }
44+ }
45+
46+ /* Job is done, remove it. */
47+ gearman_server_job_free(server_job);
48 }
49
50 break;
51
52=== modified file 'libgearman/actions.cc'
53--- libgearman/actions.cc 2013-06-15 08:54:59 +0000
54+++ libgearman/actions.cc 2013-06-21 19:13:29 +0000
55@@ -80,7 +80,7 @@
56 { }
57 else if (task->recv->command == GEARMAN_COMMAND_WORK_WARNING)
58 { }
59- else // GEARMAN_COMMAND_WORK_COMPLETE or GEARMAN_COMMAND_WORK_EXCEPTION
60+ else // GEARMAN_COMMAND_WORK_COMPLETE, GEARMAN_COMMAND_WORK_EXCEPTION
61 {
62 return GEARMAN_SUCCESS;
63 }
64
65=== modified file 'libgearman/run.cc'
66--- libgearman/run.cc 2013-06-15 09:04:34 +0000
67+++ libgearman/run.cc 2013-06-21 19:13:29 +0000
68@@ -356,6 +356,7 @@
69 {
70 task->options.is_known= false;
71 task->options.is_running= false;
72+
73 if (task->recv->argc == 1 and task->recv->data_size)
74 {
75 task->exception.store((const char*)(task->recv->data), task->recv->data_size);
76
77=== modified file 'tests/libgearman-1.0/task.cc'
78--- tests/libgearman-1.0/task.cc 2013-03-15 21:54:07 +0000
79+++ tests/libgearman-1.0/task.cc 2013-06-21 19:13:29 +0000
80@@ -306,7 +306,8 @@
81 } while (gearman_continue(ret));
82 ASSERT_EQ(ret, GEARMAN_SUCCESS);
83
84- test_truth(exception_success);
85+ ASSERT_TRUE(gearman_task_has_exception(task));
86+ ASSERT_TRUE(exception_success);
87
88 gearman_client_set_exception_fn(client, NULL);
89
90
91=== modified file 'tests/libgearman-1.0/worker_test.cc'
92--- tests/libgearman-1.0/worker_test.cc 2013-06-15 01:53:12 +0000
93+++ tests/libgearman-1.0/worker_test.cc 2013-06-21 19:13:29 +0000
94@@ -840,6 +840,7 @@
95
96 gearman_string_t exception= gearman_task_exception(task);
97 ASSERT_EQ(gearman_task_return(task), GEARMAN_WORK_EXCEPTION);
98+ ASSERT_TRUE(gearman_task_has_exception(task));
99 ASSERT_STREQ("dog", gearman_c_str(exception));
100
101 return TEST_SUCCESS;

Subscribers

People subscribed via source and target branches

to all changes: