Search Results

Search found 9154 results on 367 pages for 'job market'.

Page 38/367 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • Using delayed_job to process file uploads across multiple servers

    - by Steve Klabnik
    Does anyone have any good resources on how to do this? Basically, I'm working on a project (in Rails) where people can upload files. They might be big. I'd like to process them using delayed_job before sending them to S3. I'd also like to do this processing on a separate job queue server, rather than on the webserver itself. I'd rather not have to upload the files to the webserver, then transfer them to the job queue server, and then upload them to S3 if I don't have to. Thanks.

    Read the article

  • worth of getting certified

    - by user58935
    In 6 months I will be a graduate and pursuing a masters in computers for the next 2 years in India. My options after that are to either do a post graduation (again) from a reputed college abroad, or to take up a job. Recently I came to know about about global certification programs like ccna, ccnp, ccie, oca, ocp, j2se, mcse, mcp etc. If I do these certifications, will it help me get a better job, or get into a top college ? How much does it matter? Considering that I like most areas of computers, which certifications are most beneficial? (I even had a crazy idea to do them all in 2.5 years left. Or should I try and master a few instead). Please advise.

    Read the article

  • Delayed Jobs is not finding Records and failing..

    - by Trip
    In my app, delayed jobs isn't running automatically on my server anymore. It used to.. When I manually ssh in, and perform rake jobs:work I return this : * Starting job worker host:ip-(censored) pid:21458 * [Worker(host:ip-(censored) pid:21458)] acquired lock on PhotoJob * [JOB] host:ip-(censored) pid:21458 failed with ActiveRecord::RecordNotFound: Couldn't find Photo with ID=9237 - 4 failed attempts This returns roughly 20 times over for what I think is several jobs. Then I get a few of these: [Worker(host:ip-(censored) pid:21458)] failed to acquire exclusive lock for PhotoJob And then finally one of these : 12 jobs processed at 73.6807 j/s, 12 failed ... Any ideas what I should be mulling over? Thanks so much!

    Read the article

  • Process AJAX response with long runing tasks

    - by mpz
    I have long time task in controller action. I use delayed job for it. (Also in heroku it is good practice for perfomance - dyno must work for small time in each request) But my client need result of it work and users can wait on that task. It is more clear: no any addition models or records in it, simple view and js... I think about such way: On client run AJAX with very long timeout (5 min for example) Client make request to server as usual On controller in action1 def start_work (with delay work setup) i need NO any response to client After work performs (delay job finished) i need run new action2 with response to client Client recieve response after about 1-5 min It is possible?

    Read the article

  • Has anyone bought Market Samurai and had a good experience?

    - by ZakGottlieb
    It's hard when a piece of marketing software offers an affiliate program to ever find an objective review of it, so I thought I might try on Quora. It just boggles my mind that it can only cost $97 flat, when other SEO or keyword research tools like Wordtracker cost almost the same PER MONTH, and don't seem to offer much, if anything, more... Can anyone explain this, and would anyone recommend Market Samurai WITHOUT posting a link to it in their review? :)

    Read the article

  • Does anyone know any good resources for learning how to market a web app?

    - by Jack Kinsella
    I'm a developer first and foremost. I write web apps but have a hard time generating traffic and converting potential users once I've released my product into the wild. I know I need to learn more about marketing but I don't know where to start as I've no baseline to judge the quality of the materials I stumble across. Does anyone know any websites, blogs, e-books or other resources for learning how to market effectively?

    Read the article

  • Does anyone know any good resources for learning how to market a web app?

    - by Jack Kinsella
    I'm a developer first and foremost. I write web apps but have a hard time generating traffic and converting potential users once I've released my product into the wild. I know I need to learn more about marketing but I don't know where to start as I've no baseline to judge the quality of the materials I stumble across. Does anyone know any websites, blogs, e-books or other resources for learning how to market effectively?

    Read the article

  • Is there a market for freelancer c#/ASP.NET developers? [closed]

    - by user1361315
    Whenever I see other freelancers out there, it seems to be dominated by php, ruby type developers (or maybe I am just looking in the wrong places). Curious, is there a market for c# freelancers out there on the interwebz? Or are most c#/.net development projects longer term, so they hire in-house FT developers or in-house contractors? When I say freelancer, I am referring to getting contracts and working from home.

    Read the article

  • Don&rsquo;t apply for your first job somewhere; apply for an experience at Oracle.

    - by cristian.condurache(at)oracle.com
    Hi! My name is Stijn and I currently work as a Business Development Consultant for Oracle in Dublin since November 2010. I’m originally from Belgium and I graduated last year from the Vlerick Leuven Gent Management School. In many ways you could say I’m living the life I asked for: an international career with global organization. I’m unbelievably grateful however, because opportunities like this don’t come by the dozen. Actually, going through university and business school my dreams of an international career were clouded quite quickly. Following all the ‘right’ steps wasn’t enough. The lack of offers for, and trust in, new starters to take on a challenge like this was a reality check for me and many of my friends. It takes a company that recognizes the opportunity of recruiting talented individuals by offering them something they actually want: a first job based abroad! My job is focused on generating demand for Oracle products over the phone. In only a few months, the amazing things I’ve experienced, the people I’ve talked to, the learning experiences I’ve had in and outside of work are too many to list. From having CEO’s on the phone, to having meetings with 15 different nationalities, to getting settled from scratch in a new country… it’s something that builds you as a person. But don’t be fooled though, it’s on you - where it starts. Although Oracle gives you the best training and resources to do your job and Ireland is a playground for everything else, it’s you that is responsible. You are in control and much is expected. What you get in return however, is beyond incredible. If you are interested in joining the same team as Stijn, please visit http://campus.oracle.com or contact [email protected] Technorati Tags: Oracle,opportunity,global organisation,career,Business Development Consultant

    Read the article

  • What Is A Software Architect&rsquo;s Job Today?

    - by Tim Murphy
    Originally posted on: http://geekswithblogs.net/tmurphy/archive/2013/10/25/what-is-a-software-architectrsquos-job-today.aspx It was 2001 when a project manager first put my job title as architect on a statement of work.  A lot has changed over the last twelve years.  The concepts around what an architect is has evolved.  In the early days I would have said that they just rebranded the role of the system analyst.  Now we have a multitude of architect titles: application, solution, IT, data, enterprise.  Whatever the title the goals are the same.  An architect takes the business needs and maps them to the solutions that are needed and at the same time works to ensure the quality of the solution and its maintainability. One of the problems I see these days is that we are expecting every developer to have architect skills.  That in itself is not a problem.  This reduces the need for dedicated architects.  Not every developer though is going to be able to step up to this level.  Some are just good at solving small problems instead of thinking in the larger abstract. Another problem is the accelerating speed and breadth of new technologies and products.  For an architect to be good at his job he needs to spend large amounts of personal time studying just to stay relevant. In the end I don’t think the main objectives of an architect has changed, just the level of commitment needed to stay of value to your company.  Renew your commitment to your profession and keep delivering great solutions. Technorati Tags: software architect,enterprise architect,data architect,solution architect,IT architect,PSC,PSC Group

    Read the article

  • What should I quote for a project I hope to get a job at the end of?

    - by thesunneversets
    Long story short: I applied for a (CakePHP, MySQL, etc) development job in London, UK. I grew up in Britain but am currently based quite a few thousand miles away in Canada, so I wasn't really expecting success. But quite a few emails and phone interviews later it seems that they really like me. At least to a point. Because such a major relocation would be a horrible thing to go wrong, they've sensibly suggested a trial run of getting me to build a website at a distance. I have the spec for this and it's quite a substantial amount of work. My problem is that I now need to suggest both a fee and a timescale for the job, and I haven't got any significant experience of working as a contractor. Looking at the spec, which is 1500 words of many concisely stated features, some fairly trivial and some moderately involved, I can easily imagine there being 2 weeks of intensive work there. (If everything went really well it might be closer to one week, but even though I want to impress, I definitely don't want to fall into the inexperienced-contractor trap of massively underestimating the amount of time a project will run to.) As an extra complication, there is no expectation that I should give up my day job to get this trial project done, so the hours will have to be clawed from evenings and weekends. I don't want to overcommit to a quick delivery date, only to find myself swiftly burning out due to an unrealistic workload. So, any advice for me? My main question is, what is a realistic hourly figure to demand of a stable but not excessively wealthy London-based company in the current market, bearing in mind that I'd like them to hire me afterwards? But any more general recommendations based on my circumstances above would be much appreciated too. Many thanks!

    Read the article

  • How can I make myself better at programming working at a shi* job ?

    - by Scrooge
    I recently graduated with an Engineering degree in Computer Science, but my employer (a mid-sized software company) is not using my logical and programming skills. I want to move to a better opportunity but how do I do that since my experience here is not going to count as much? How do I get a better programming job? The worst part is that I am still reading from books (and not writing code myself) even after I have started working. They are paying me a standard entry level Indian IT job rate but I really dont care. It's not worth it. Please advise as to how I can do something worthwhile. (I have studied C++; Core Java; Ruby On Rails ..made a couple of academic projects but no relevant practical real world experience). Just to make things easier .. let me list a few basic queries How I get better at programming without a good project at my company? Please suggest projects where I can learn to write practical code (platform doesn't matter) Best place to take part in open source development? Is it possible that I earn slightly more while I learn? (apart from my sh** job I mean) What kind of practical projects are best suited for me? (ie for an entry level programmer)

    Read the article

  • Are scheduled job servers the right choice for a time sensitive game engine?

    - by maple_shaft
    I am currently architecting and designing an exciting new web application that will be entering into some areas that I have very little experience in, game development. The application is not necessarily a game, but there are some very time sensitive tasks and scheduled jobs that a server will need to run to perform game related activities (Eg. New match up starts at noon every day for a 12 day tournament, updating scoreboards at 5pm every day, etc...) In the past I have typically used cron jobs with the Quartz Scheduler running within a web application server, but I know that this isn't likely a scalable solution for the truly massive userbase that management is telling me to expect (Granted they are management and are probably highly optimistic about this) and also for how important the role of these tasks are in this web application. The other important thing I want to consider is that I want to avoid SPOF (Single Point Of Failure). If the primary job server goes down, another job server should be able to successfully run the job in its place. I suppose this can be done appropriately record locking and database transactions. My question is if scheduled jobs like CRON running on a web application server are a wise design choice given the time sensitive game tasks of this application, or is there something more appropriate for running a scalable game engine parallel to the web application servers?

    Read the article

  • Moving soon, fiancee has new job: how to transition?

    - by Anonymous
    I've found myself in a sort of conundrum lately and I figured Stack Overflow would be the place to ask this question. I normally post under my personal account here, but I'm writing in anonymously this time so as to make sure my co-workers don't find out too early that I'll be leaving them behind in a few months. My fiancee just landed a great software development job at a very large, stable company. She'll be starting after she graduates and just after we get married (May to June-ish). Her compensation and benefits package will be more than enough to take care of both of us, so I agreed to step down from my current position so we could move to a larger city with more opportunities. I'll probably take a few weeks off to decompress, but I don't want to stay unemployed very long. Since there will be less pressure on me to bring home a second income though, we're not as adverse to risk as we normally would be. I'm currently debating whether to eventually seek employment at a small company, a larger company, do contract work, or do something else entirely. I haven't been in the software development business long (2-3 years plus some small personal projects), but I've seen what things can be like at a startup (my first job) and at a more established, mid-sized business (my current job). Most importantly what I'm looking for out of a new employment opportunity is challenge and variety. Does this situation describe anyone on SO? If so, what did you do/what are you doing? How is it working out for you? Programming is a pleasure as well as a career skill for me, so I want to make sure it stays that way. Thanks to all in advance for any responses.

    Read the article

  • Java NullPointerException In the constructor's class

    - by AndreaF
    I have made a Java class where I have defined a constructor and some methods but I get a NullPointer Exception, and I don't know how I could fix It. public class Job { String idJob; int time; int timeRun; Job j1; List<Job> startBeforeStart; List<Job> restricted; Job(String idJob, int time){ this.idJob=idJob; this.time=time; } public boolean isRestricted() { return restricted.size() != 0; } public void startsBeforeStartOf(Job job){ startBeforeStart.add(job); job.restricted.add(this); } public void startsAfterStartOf(Job job){ job.startsBeforeStartOf(this); } public void checkRestrictions(){ if (!isRestricted()){ System.out.println("+\n"); } else{ Iterator<Job> itR = restricted.iterator(); while(itR.hasNext()){ Job j1 = itR.next(); if(time>timeRun){ System.out.println("-\n"); time--; } else { restricted.remove(j1); } } } } @Override public boolean equals(Object obj) { return obj instanceof Job && ((Job) obj).idJob.equals(idJob); } public void run() { timeRun++; } } PS Looking in a forum a user says that to fix the error I should make an ArrayList inside the constructor (without modify the received parameters that should remain String id and int time), but I haven't understand what He mean.

    Read the article

  • How can I resolve Hibernate 3's ConstraintViolationException when updating a Persistent Entity's Col

    - by Tim Visher
    I'm trying to discover why two nearly identical class sets are behaving different from Hibernate 3's perspective. I'm fairly new to Hibernate in general and I'm hoping I'm missing something fairly obvious about the mappings or timing issues or something along those lines but I spent the whole day yesterday staring at the two sets and any differences that would lead to one being able to be persisted and the other not completely escaped me. I appologize in advance for the length of this question but it all hinges around some pretty specific implementation details. I have the following class mapped with Annotations and managed by Hibernate 3.? (if the specific specific version turns out to be pertinent, I'll figure out what it is). Java version is 1.6. ... @Embeddable public class JobStateChange implements Comparable<JobStateChange> { @Temporal(TemporalType.TIMESTAMP) @Column(nullable = false) private Date date; @Enumerated(EnumType.STRING) @Column(nullable = false, length = JobState.FIELD_LENGTH) private JobState state; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "acting_user_id", nullable = false) private User actingUser; public JobStateChange() { } @Override public int compareTo(final JobStateChange o) { return this.date.compareTo(o.date); } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } else if (!(obj instanceof JobStateChange)) { return false; } JobStateChange candidate = (JobStateChange) obj; return this.state == candidate.state && this.actingUser.equals(candidate.getUser()) && this.date.equals(candidate.getDate()); } @Override public int hashCode() { return this.state.hashCode() + this.actingUser.hashCode() + this.date.hashCode(); } } It is mapped as a Hibernate CollectionOfElements in the class Job as follows: ... @Entity @Table( name = "job", uniqueConstraints = { @UniqueConstraint( columnNames = { "agency", //Job Name "payment_type", //Job Name "payment_file", //Job Name "date_of_payment", "payment_control_number", "truck_number" }) }) public class Job implements Serializable { private static final long serialVersionUID = -1131729422634638834L; ... @org.hibernate.annotations.CollectionOfElements @JoinTable(name = "job_state", joinColumns = @JoinColumn(name = "job_id")) @Sort(type = SortType.NATURAL) private final SortedSet<JobStateChange> stateChanges = new TreeSet<JobStateChange>(); ... public void advanceState( final User actor, final Date date) { JobState nextState; LOGGER.debug("Current state of {} is {}.", this, this.getCurrentState()); if (null == this.currentState) { nextState = JobState.BEGINNING; } else { if (!this.isAdvanceable()) { throw new IllegalAdvancementException(this.currentState.illegalAdvancementStateMessage); } if (this.currentState.isDivergent()) { nextState = this.currentState.getNextState(this); } else { nextState = this.currentState.getNextState(); } } JobStateChange stateChange = new JobStateChange(nextState, actor, date); this.setCurrentState(stateChange.getState()); this.stateChanges.add(stateChange); LOGGER.debug("Advanced {} to {}", this, this.getCurrentState()); } private void setCurrentState(final JobState jobState) { this.currentState = jobState; } boolean isAdvanceable() { return this.getCurrentState().isAdvanceable(this); } ... @Override public boolean equals(final Object obj) { if (obj == this) { return true; } else if (!(obj instanceof Job)) { return false; } Job otherJob = (Job) obj; return this.getName().equals(otherJob.getName()) && this.getDateOfPayment().equals(otherJob.getDateOfPayment()) && this.getPaymentControlNumber().equals(otherJob.getPaymentControlNumber()) && this.getTruckNumber().equals(otherJob.getTruckNumber()); } @Override public int hashCode() { return this.getName().hashCode() + this.getDateOfPayment().hashCode() + this.getPaymentControlNumber().hashCode() + this.getTruckNumber().hashCode(); } ... } The purpose of JobStateChange is to record when the Job moves through a series of State Changes that are outline in JobState as enums which know about advancement and decrement rules. The interface used to advance Jobs through a series of states is to call Job.advanceState() with a Date and a User. If the Job is advanceable according to rules coded in the enum, then a new StateChange is added to the SortedSet and everyone's happy. If not, an IllegalAdvancementException is thrown. The DDL this generates is as follows: ... drop table job; drop table job_state; ... create table job ( id bigint generated by default as identity, current_state varchar(25), date_of_payment date not null, beginningCheckNumber varchar(8) not null, item_count integer, agency varchar(10) not null, payment_file varchar(25) not null, payment_type varchar(25) not null, endingCheckNumber varchar(8) not null, payment_control_number varchar(4) not null, truck_number varchar(255) not null, wrapping_system_type varchar(15) not null, printer_id bigint, primary key (id), unique (agency, payment_type, payment_file, date_of_payment, payment_control_number, truck_number) ); create table job_state ( job_id bigint not null, acting_user_id bigint not null, date timestamp not null, state varchar(25) not null, primary key (job_id, acting_user_id, date, state) ); ... alter table job add constraint FK19BBD12FB9D70 foreign key (printer_id) references printer; alter table job_state add constraint FK57C2418FED1F0D21 foreign key (acting_user_id) references app_user; alter table job_state add constraint FK57C2418FABE090B3 foreign key (job_id) references job; ... The database is seeded with the following data prior to running tests ... insert into job (id, agency, payment_type, payment_file, payment_control_number, date_of_payment, beginningCheckNumber, endingCheckNumber, item_count, current_state, printer_id, wrapping_system_type, truck_number) values (-3, 'RRB', 'Monthly', 'Monthly','4501','1998-12-01 08:31:16' , '00000001','00040000', 40000, 'UNASSIGNED', null, 'KERN', '02'); insert into job_state (job_id, acting_user_id, date, state) values (-3, -1, '1998-11-30 08:31:17', 'UNASSIGNED'); ... After the database schema is automatically generated and rebuilt by the Hibernate tool. The following test runs fine up until the call to Session.flush() ... @ContextConfiguration(locations = { "/applicationContext-data.xml", "/applicationContext-service.xml" }) public class JobDaoIntegrationTest extends AbstractTransactionalJUnit4SpringContextTests { @Autowired private JobDao jobDao; @Autowired private SessionFactory sessionFactory; @Autowired private UserService userService; @Autowired private PrinterService printerService; ... @Test public void saveJob_JobAdvancedToAssigned_AllExpectedStateChanges() { //Get an unassigned Job Job job = this.jobDao.getJob(-3L); assertEquals(JobState.UNASSIGNED, job.getCurrentState()); Date advancedToUnassigned = new GregorianCalendar(1998, 10, 30, 8, 31, 17).getTime(); assertEquals(advancedToUnassigned, job.getStateChange(JobState.UNASSIGNED).getDate()); //Satisfy advancement constraints and advance job.setPrinter(this.printerService.getPrinter(-1L)); Date advancedToAssigned = new Date(); job.advanceState( this.userService.getUserByUsername("admin"), advancedToAssigned); assertEquals(JobState.ASSIGNED, job.getCurrentState()); assertEquals(advancedToUnassigned, job.getStateChange(JobState.UNASSIGNED).getDate()); assertEquals(advancedToAssigned, job.getStateChange(JobState.ASSIGNED).getDate()); //Persist to DB this.sessionFactory.getCurrentSession().flush(); ... } ... } The error thrown is SQLCODE=-803, SQLSTATE=23505: could not insert collection rows: [jaci.model.job.Job.stateChanges#-3] org.hibernate.exception.ConstraintViolationException: could not insert collection rows: [jaci.model.job.Job.stateChanges#-3] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1416) at org.hibernate.action.CollectionUpdateAction.execute(CollectionUpdateAction.java:86) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:170) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027) at jaci.dao.JobDaoIntegrationTest.saveJob_JobAdvancedToAssigned_AllExpectedStateChanges(JobDaoIntegrationTest.java:98) at org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:160) at org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233) at org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333) at org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217) at org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197) at org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:160) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97) Caused by: com.ibm.db2.jcc.b.lm: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=1;ACI_APP.JOB_STATE, DRIVER=3.50.152 at com.ibm.db2.jcc.b.wc.a(wc.java:575) at com.ibm.db2.jcc.b.wc.a(wc.java:57) at com.ibm.db2.jcc.b.wc.a(wc.java:126) at com.ibm.db2.jcc.b.tk.b(tk.java:1593) at com.ibm.db2.jcc.b.tk.c(tk.java:1576) at com.ibm.db2.jcc.t4.db.k(db.java:353) at com.ibm.db2.jcc.t4.db.a(db.java:59) at com.ibm.db2.jcc.t4.t.a(t.java:50) at com.ibm.db2.jcc.t4.tb.b(tb.java:200) at com.ibm.db2.jcc.b.uk.Gb(uk.java:2355) at com.ibm.db2.jcc.b.uk.e(uk.java:3129) at com.ibm.db2.jcc.b.uk.zb(uk.java:568) at com.ibm.db2.jcc.b.uk.executeUpdate(uk.java:551) at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46) at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1389) Therein lies my problem… A nearly identical Class set (in fact, so identical that I've been chomping at the bit to make it a single class that serves both business entities) runs absolutely fine. It is identical except for name. Instead of Job it's Web. Instead of JobStateChange it's WebStateChange. Instead of JobState it's WebState. Both Job and Web's SortedSet of StateChanges are mapped as a Hibernate CollectionOfElements. Both are @Embeddable. Both are SortType.Natural. Both are backed by an Enumeration with some advancement rules in it. And yet when a nearly identical test is run for Web, no issue is discovered and the data flushes fine. For the sake of brevity I won't include all of the Web classes here, but I will include the test and if anyone wants to see the actual sources, I'll include them (just leave a comment). The data seed: insert into web (id, stock_type, pallet, pallet_id, date_received, first_icn, last_icn, shipment_id, current_state) values (-1, 'PF', '0011', 'A', '2008-12-31 08:30:02', '000000001', '000080000', -1, 'UNSTAGED'); insert into web_state (web_id, date, state, acting_user_id) values (-1, '2008-12-31 08:30:03', 'UNSTAGED', -1); The test: ... @ContextConfiguration(locations = { "/applicationContext-data.xml", "/applicationContext-service.xml" }) public class WebDaoIntegrationTest extends AbstractTransactionalJUnit4SpringContextTests { @Autowired private WebDao webDao; @Autowired private UserService userService; @Autowired private SessionFactory sessionFactory; ... @Test public void saveWeb_WebAdvancedToNewState_AllExpectedStateChanges() { Web web = this.webDao.getWeb(-1L); Date advancedToUnstaged = new GregorianCalendar(2008, 11, 31, 8, 30, 3).getTime(); assertEquals(WebState.UNSTAGED, web.getCurrentState()); assertEquals(advancedToUnstaged, web.getState(WebState.UNSTAGED).getDate()); Date advancedToStaged = new Date(); web.advanceState( this.userService.getUserByUsername("admin"), advancedToStaged); this.sessionFactory.getCurrentSession().flush(); web = this.webDao.getWeb(web.getId()); assertEquals( "Web should have moved to STAGED State.", WebState.STAGED, web.getCurrentState()); assertEquals(advancedToUnstaged, web.getState(WebState.UNSTAGED).getDate()); assertEquals(advancedToStaged, web.getState(WebState.STAGED).getDate()); assertNotNull(web.getState(WebState.UNSTAGED)); assertNotNull(web.getState(WebState.STAGED)); } ... } As you can see, I assert that the Web was reconstituted the way I expect, I advance it, flush it to the DB, and then re-get it and verify that the states are as I expect. Everything works perfectly. Not so with Job. A possibly pertinent detail: the reconstitution code works fine if I cease to map JobStateChange.data as a TIMESTAMP and instead as a DATE, and ensure that all of the StateChanges always occur on different Dates. The problem is that this particular business entity can go through many state changes in a single day and so it needs to be sorted by time stamp rather than by date. If I don't do this then I can't sort the StateChanges correctly. That being said, WebStateChange.date is also mapped as a TIMESTAMP and so I again remain absolutely befuddled as to where this error is arising from. I tried to do a fairly thorough job of giving all of the technical details of the implementation but as this particular question is very implementation specific, if I missed anything just let me know in the comments and I'll include it. Thanks so much for your help! UPDATE: Since it turns out to be important to the solution of my problem, I have to include the pertinent bits of the WebStateChange class as well. ... @Embeddable public class WebStateChange implements Comparable<WebStateChange> { @Temporal(TemporalType.TIMESTAMP) @Column(nullable = false) private Date date; @Enumerated(EnumType.STRING) @Column(nullable = false, length = WebState.FIELD_LENGTH) private WebState state; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "acting_user_id", nullable = false) private User actingUser; ... WebStateChange( final WebState state, final User actingUser, final Date date) { ExceptionUtils.illegalNullArgs(state, actingUser, date); this.state = state; this.actingUser = actingUser; this.date = new Date(date.getTime()); } @Override public int compareTo(final WebStateChange otherStateChange) { return this.date.compareTo(otherStateChange.date); } @Override public boolean equals(final Object candidate) { if (this == candidate) { return true; } else if (!(candidate instanceof WebStateChange)) { return false; } WebStateChange candidateWebState = (WebStateChange) candidate; return this.getState() == candidateWebState.getState() && this.getUser().equals(candidateWebState.getUser()) && this.getDate().equals(candidateWebState.getDate()); } @Override public int hashCode() { return this.getState().hashCode() + this.getUser().hashCode() + this.getDate().hashCode(); } ... }

    Read the article

  • Tailing 'Jobs' with Perl under mod_perl

    - by Matthew
    Hi everyone, I've got this project running under mod_perl shows some information on a host. On this page is a text box with a dropdown that allows users to ping/nslookup/traceroute the host. The output is shown in the text box like a tail -f. It works great under CGI. When the user requests a ping it would make an AJAX call to the server, where it essentially starts the ping with the output going to a temp file. Then subsequent ajax calls would 'tail' the file so that the output was updated until the ping finished. Once the job finished, the temp file would be removed. However, under mod_perl no matter what I do I can's stop it from creating zombie processes. I've tried everything, double forking, using IPC::Run etc. In the end, system calls are not encouraged under mod_perl. So my question is, maybe there's a better way to do this? Is there a CPAN module available for creating command line jobs and tailing output that will work under mod_perl? I'm just looking for some suggestions. I know I could probably create some sort of 'job' daemon that I signal with details and get updates from. It would run the commands and keep track of their status etc. But is there a simpler way? Thanks in advance.

    Read the article

  • Rails running multiple delayed_job - lock tables

    - by pepernik
    Hey. I use delayed_job for background processing. I have 8 CPU server, MySQL and I start 7 delayed_job processes RAILS_ENV=production script/delayed_job -n 7 start Q1: I'm wondering is it possible that 2 or more delayed_job processes start processing the same process (the same record-row in the database delayed_jobs). I checked the code of the delayed_job plugin but can not find the lock directive in a way it should be. I think each process should lock the database table before executing an UPDATE on lock_by column. They lock the record simply by updating the locked_by field (UPDATE delayed_jobs SET locked_by...). Is that really enough? No locking needed? Why? I know that UPDATE has higher priority than SELECT but I think this does not have the effect in this case. My understanding of the multy-threaded situation is: Process1: Get waiting job X. [OK] Process2: Get waiting jobs X. [OK] Process1: Update locked_by field. [OK] Process2: Update locked_by field. [OK] Process1: Get waiting job X. [Already processed] Process2: Get waiting jobs X. [Already processed] I think in some cases more jobs can get the same information and can start processing the same process. Q2: Is 7 delayed_jobs a good number for 8CPU server? Why yes/not. Thx 10x!

    Read the article

  • Appropriate Footwear for An Interview

    - by EoRaptor013
    There's a raging debate going on at my house about appropriate footwear for an IT interview. I have an interview, on Thursday, for a SQL/C# developer with the Fraud dept. at a large accounting firm. I was planning on wearing what I have pretty much always worn for an interview: a nice suit, white shirt, subdued tie, and a pair of dress cowboy boots. My spouse and daughter both know that my dress code for nearly every professional job I've ever gotten, is pretty much the same -- including the boots -- with what I just described. Now, however, because I've been out of work for an unfortunately long time (my last contract ended 03/09 -- pretty much coincidental with the bottom falling out of the economy). My wife insists that style standards are fundamentally different on the left side of the Mississippi vs. the right side of the river. My view is that I've always worn "cowboy" boots; since I was old enough to fit into a real pair. I moved East, as an adult, over 30 years ago, but my dress patterns haven't changed. And in all that time, my dress patterns have never changed. Now I both really want, and really need, this job. But, is that sufficient reason to change a habit 40 years in the making? I would really appreciate the thoughts ya'all (little West of Ms. colloquialism, there) might have on this matter. Thanks. P.S. If this sort of question is inappropriate for this form, I apologize.

    Read the article

  • Unix Interview Question

    - by Rachel
    I am giving some interviews right now and recently I was asked this questions in Interview and I was not sure of the answer, in your opinion are this kind of questions worthwhile for Interview process and if yes than how would you go about approaching this kind of questions. How to get number of files in directory without using wc ? How to get all files in descending order on size ? What is the significance of ? in file searching ? Would appreciate if you can provide answers for this questions so that I could learn something about them as I am not sure for this questions.

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >